\ProvidesPackage{config/minimal-resume}

% margin
\usepackage[top=1in, bottom=1in, left=1in, right=1in]{geometry}

% minimal custom packages
\usepackage[T1]{fontenc}
\usepackage{fontspec}
\usepackage[babel=true]{microtype}
\usepackage[fontsize=10.75pt]{scrextend}
\usepackage{enumitem}

\defaultfontfeatures{Ligatures=TeX}

% font families
\newfontfamily{\montserratfont}[Path=fonts/,BoldFont=Montserrat-Bold]{Montserrat-Regular}
\newfontfamily{\crimsonfont}[Path=fonts/,ItalicFont=CrimsonText-Italic]{CrimsonText-Regular}

% main font for the document
\setmainfont[Path=fonts/, ItalicFont=CrimsonText-Italic]{CrimsonText-Regular}

% font sizes
\newcommand{\sizeone}{1.618em}
\newcommand{\sizetwo}{1.318em}
\newcommand{\sizethree}{1em}
\newcommand{\sizefour}{0.618em}
\newcommand{\sizefive}{0.382em}
\newcommand{\sizesix}{0.236em}

% line spaces
\newcommand{\linespaceone}{1}

\newenvironment{newitemize}
  {\itemize[nolistsep,topsep=\sizefive,itemsep=\sizefive,labelsep=\sizefour,leftmargin=*]}
  {\enditemize}

\newcommand{\personal}[3]{
  \begin{center}
    % name
    {
      \fontsize{\sizeone}{\sizeone}\fontspec[Path = fonts/,LetterSpace=15]{Montserrat-Regular}#1
    }\\
    % address
    \vspace{\sizethree}
    {
      \fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/,LetterSpace= 10]{Montserrat-Light}#2
    }\\
    % contact
    \vspace{\sizefive}
    {
      \fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{Montserrat-Light}#3
    }
  \end{center}
}

\newcommand{\chap}[2]{
  \vspace{\sizethree}
  \raggedright
  {\hrule height 0.5pt}
  \vspace{\sizefive}
  \begin{addmargin}[\sizefive]{\sizefive}{
  {
  \fontsize{\sizefour}{\sizefour}\fontspec[Path = fonts/,LetterSpace=10]{Montserrat-Bold}
  \textbf{#1}
  }
  \vspace{\sizefour}
  {#2}
  }
  \end{addmargin}
}

\newcommand{\subchap}[3]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-SemiBold} #1} \hfill {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-Regular} #2}
  {#3}
  \vspace{\sizefive}
}

\newcommand{\school}[5]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-SemiBold} #1} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #2}

  {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #3}\hfill{\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular}#4}\\#5
  \vspace{\sizefive}
}

\newcommand{\job}[5]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-SemiBold} #1} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #2}

  {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #3} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #4}
  {#5}
  \vspace{\sizefive}
}

\newcommand{\project}[4]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-SemiBold} #1} {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #2} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #3}
  \\#4
  \vspace{\sizefive}
}

\newcommand{\award}[4]{
  \vspace{\sizefive}
  {\fontsize{\sizetwo}{\sizetwo}\fontspec[Path = fonts/]{CrimsonText-SemiBold} #1} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #2}

  {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #3} \hfill {\fontsize{\sizethree}{\sizethree}\fontspec[Path = fonts/]{CrimsonText-Regular} #4}
  \vspace{\sizefive}
}
